/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.pennychecker.swing.presenter.ext.listener;

import com.pennychecker.swing.presenter.ext.component.HandlerAdapter;
import com.pennychecker.swing.presenter.ext.event.ClickEvent;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

/**
 *
 * @author iolaus
 */
public class ChangeTabListener implements ChangeListener {

    private final HandlerAdapter handlerAdapter;

    public ChangeTabListener(HandlerAdapter handlerAdapter) {
        this.handlerAdapter = handlerAdapter;
    }

    public void stateChanged(ChangeEvent e) {
        handlerAdapter.fireEvent(new ClickEvent());
    }
}
